﻿@model IEnumerable<ScrumProject.Models.Sprint>

@{
    ViewBag.Title = "Index";
}

<h2>Sprints</h2>

<p>
    @Html.ActionLink("Create New", "Create", new { projectId = ViewBag.projectId}, null)
</p>
<table class="table">
    <tr>
        <th>
            DateFrom
        </th>
        <th>
            DateTo
        </th>
        <th>
            Velocity
        </th>
        @*<th>
            Status
        </th>*@
        <th>
            Project
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td><center>@Html.DisplayFor(modelItem => item.DateFrom)</center></td>
        <td><center>@Html.DisplayFor(modelItem => item.DateTo)</center></td>
        <td><center>@Html.DisplayFor(modelItem => item.Velocity)</center></td>
        @*<td><center>@Html.DisplayFor(modelItem => item.Status)</center></td>*@
        <td><center>@Html.DisplayFor(modelItem => item.Project.Name)</center></td>
        <td><center>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id = item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.Id }) </center>
        </td>
    </tr>
}

</table>
<br />
<div>
    @Html.ActionLink("Back to Project", "Details", "Project", new { id = ViewBag.projectId },null)
</div>
